package skill

import (
	"time"

	"gddgame.cc/galaxy/common/dsl/game/attr"
)

const SettingBuffName = "setting_buff"

type SettingBuff struct {
	Id            int    `json:"id" orm:"auto" sql:"INT"`
	Effect        string `json:"effect" sql:"VARCHAR"`
	Name          string `json:"name" sql:"VARCHAR"`
	IntervalTime  int    `json:"intervalTime" sql:"INT"`
	SustainedTime int    `json:"sustainedTime" sql:"INT"`
	Overlying     bool   `json:"overlying" sql:"TINYINT"`

	AttrEffect attr.AttrEffectSlice `json:"attrEffect" sql:"JSON"`
	AttrEvent  [][]attr.AttrEvent   `json:"attrEvent" sql:"JSON"`
	CasterAttr attr.AttrEffectSlice `json:"casterAttr" sql:"JSON"`
	TargetAttr attr.AttrEffectSlice `json:"targetAttr" sql:"JSON"`

	Define       int   `json:"define" sql:"INT"`
	DefineLevel  int   `json:"define_level" sql:"INT"`
	Group        []int `json:"group" sql:"JSON"`
	IsDeathClear bool  `json:"is_death_clear" sql:"TINYINT"`
	IsSave       bool  `json:"is_save" sql:"TINYINT"`

	UpdateTime *time.Time `json:"update_time" orm:"updateTime" sql:"DATETIME"`
}
